package session.TX;

import entity.Area;
import entity.PerformanceItem;
import entity.Showing;
import entity.Venue;
import Helper.PerformanceHelper;
import exception.VenueConflictException;
import exception.ExistException;
import exception.OccupiedException;
import exception.OutstandingEventsException;
import exception.ShowNotFoundException;
import exception.TimingException;
import Helper.Seats;
import Helper.ShowHelper;
import javax.ejb.Remote;
import java.util.Calendar;
import java.util.List;

/**
 * @Written by T12 (IS3102 AY2011/12)
 */
@Remote
public interface PerformanceTicketingSBRemote {
    // will be removed
    //public void add();
    public List<String> getStakeholdersName();
    public Long getStakeholderId(String stakeholderName);
    // for TCube admin
    public void addVenue(String name, String address, String layout, Integer capacity, Double latitude, Double longtitude, boolean active) throws ExistException;
    public void removeVenue(String name) throws ExistException, OutstandingEventsException;
    public void modifyVenue(String name, String address, String layout, Integer capacity, Double latitude, Double longtitude, boolean active) throws ExistException;
    public List<Venue> viewVenues();
    public void removeVenueLayout(String venueName) throws ExistException;
    // for stakeholders
    public void addEvent(Long stakeholderId, String eventName, String eventPoster, String description, String eventRating, String eventLanguage, int eventDuration, String type, String genre, Calendar startDate, Calendar endDate) throws TimingException;
    public void removeEvent(Long stakeholderId, Long id) throws OutstandingEventsException;
    public void modifyEvent(Long stakeholderId, Long id, String name, String eventPoster, String description, String eventRating, String eventLanguage, int eventDuration, String type, String genre, Calendar startDate, Calendar endDate) throws TimingException;
    public String getEventName(Long id);
    public Calendar getEventStartDate(Long id);
    public Calendar getEventEndDate(Long id);
    public List<PerformanceItem> getEvent(Long stakeholderId);
    public void addArea(String areaName, Seats[][] seats, double cost, Long showID) throws ExistException, OccupiedException;
    public Seats[][] getSeats(Long areaid);
    //public void addAreas(String areaName, Seats[][] seats, double cost, Long eventID, Calendar timing, String venueName) throws ExistException, OccupiedException;
    public void removeArea(Long id) throws ExistException, OutstandingEventsException;
    public List<Area> getAllAreas(Long id);
    public Boolean isAreaNull(Long areaId);
    public void modifyArea(String areaName, Seats[][] seats, double cost, Long areaId) throws ExistException, OccupiedException;
    public void addShow(Long eventID, Calendar timing, String showLayout, String venueName) throws VenueConflictException, TimingException;
    public void removeShow(Long showId, Long eventId) throws ExistException, OccupiedException;
    public void modifyShow(Long showId, String venueName, String showLayout, Calendar showtime) throws ExistException, VenueConflictException;
    public Calendar getTiming(Long id);
    public void removePoster(Long eventId) throws ExistException;
    public void removeShowLayout(Long showId) throws ExistException;;
    // users
    public Seats[][] getSeatsinArea(String areaName, Long eventId, Calendar c) throws ShowNotFoundException;
    public boolean checkSeat(String areaName, String seatNum, Long eventId, Calendar c) throws ShowNotFoundException;
    public void bookSeat(String areaName, String seatNum, Long eventId, Calendar c) throws ShowNotFoundException;
    public Showing getSelectedShow(Long id, String selectedSlot);
    // others
    public List<PerformanceHelper> getShows();
    public List<PerformanceHelper> getNowShowing();
    public List<PerformanceHelper> getComingSoon();
    public List<String> getAllActiveVenues();
    public List<ShowHelper> getSpecificShows(Long eventId);
    public String getEventOrganiser(Long eventId) throws ExistException;
    public void buyTickets(String performance, Calendar showdate, String showtime, String venue, String seatNumber, String seller, String buyer, Long areaId, Long showId);
    public void createPerformanceTicketEntity(String performance, Calendar showdate, String venue, String seat, String seller, String buyer, Long areaId, Long showId);
    public java.util.List<entity.EventTicket> getTicket(java.lang.String email);
    
}
